package com.chainyoung.trademarket.api;

import com.chainyoung.common.appcommon.entity.CommonList;
import com.chainyoung.common.base.BaseResponse;
import com.chainyoung.common.bean.UserInfo;
import com.chainyoung.component_tmperson.constant.PersonServerContant;
import com.chainyoung.component_tmperson.entity.MyTotalAsset;
import com.chainyoung.trademarket.di.module.FindData;
import com.chainyoung.trademarket.entity.Ad;
import com.chainyoung.trademarket.entity.IndexApp;
import com.chainyoung.trademarket.entity.IndexData;
import com.chainyoung.trademarket.entity.Information;
import com.chainyoung.trademarket.entity.Msg;
import com.chainyoung.trademarket.constant.ServerConstant;
import com.chainyoung.trademarket.entity.MsgNum;

import java.util.List;
import java.util.TreeMap;

import io.reactivex.Flowable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Headers;
import retrofit2.http.POST;

public interface MainService {

    @FormUrlEncoded
    @POST(ServerConstant.LOGIN_IN)
    Flowable<BaseResponse<UserInfo>> getLogin(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(ServerConstant.SEND_CODE)
    Flowable<BaseResponse<String>> sendCode(@FieldMap TreeMap<String, Object> map);


    @FormUrlEncoded
    @POST(ServerConstant.REGISTER)
    Flowable<BaseResponse<UserInfo>> getRegister(@FieldMap TreeMap<String, Object> map);


    @FormUrlEncoded
    @POST(ServerConstant.MSG_LIST)
    Flowable<BaseResponse<List<CommonList<Msg>>>> getMsg(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(ServerConstant.UPDATE_MSG_STATUS)
    Flowable<BaseResponse<MsgNum>> updateMsgStatus(@FieldMap TreeMap<String, Object> map);


    @FormUrlEncoded
    @POST(ServerConstant.GET_USER_INFO)
    Flowable<BaseResponse<UserInfo>> getUserInfo(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(ServerConstant.GET_TOTAL_ASSET)
    Flowable<BaseResponse<MyTotalAsset>> getTotalAsset(@FieldMap TreeMap<String, Object> map);
    @FormUrlEncoded
    @POST(ServerConstant.INDEX_ADS)
    Flowable<BaseResponse<List<Ad>>> getIndexAds(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(ServerConstant.AD_DETAIL)
    Flowable<BaseResponse<Ad>> getAdDetail(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(ServerConstant.FIND_PWD)
    Flowable<BaseResponse<String>> updatePwd(@FieldMap TreeMap<String, Object> map);

    @POST(ServerConstant.GET_FIND_DATA)
    Flowable<BaseResponse<FindData>> getFindData();


    @FormUrlEncoded
    @POST(ServerConstant.GET_INDEX_APPS)
    Flowable<BaseResponse<IndexData>> getIndexApps(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(ServerConstant.GET_INFORMATION_LIST)
    Flowable<BaseResponse<CommonList<Ad>>> getInformationList(@FieldMap TreeMap<String, Object> map);


}
